<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <?php
            echo $this->headMeta()->appendHttpEquiv('Content-Type', 'text/html; charset=utf-8');

            echo $this->headLink()->appendStylesheet('/ext/resources/css/ext-all.css')
                                  ->appendStylesheet('/css/layout.css');

            echo $this->headScript()->appendFile('/ext/adapter/ext/ext-base.js')
                                    ->appendFile('/ext/ext-all.js')
                                    ->appendFile('/js/global_layout.js')
                                    ->appendFile('/js/x_msg.js')
                                    ->appendFile('/js/x_form.js')
                                    ->appendFile('/js/x_grid.js')
                                    ->appendFile('/js/x_store.js')
                                    ->appendFile('/js/ext_configuracion_editar.js');
        ?>
    </head>
    <body>
        <table class="layout">
            <tr><td id="layout_header"></td></tr>
            <tr><td id="layout_menu"></td></tr>
            <tr><td id="layout_content"></td></tr>
            <tr><td id="layout_footer"></td></tr>
        </table>
    </body>
    <script type="text/javascript">
        Ext.onReady(function()
        {
            try{
                <?php X\MenuAdmin::Show(); ?>
                <?php  if ($this->error): ?>

                    <?php echo 'X.msg.FailureRedirect(' . json_encode($this->error) . ', "/");'; ?>

                <?php else:
                    
                    foreach($this->configuraciones as $configuracion){
                        switch ($configuracion->getNombreConfiguracion())
                        {
                            case 'Director Gral':           echo "Ext.getCmp('directorGeneral')       .setValue('".$configuracion->getValorConfiguracion()."');"; break;
                            case 'Director Administrativo': echo "Ext.getCmp('directorAdministrativo').setValue('".$configuracion->getValorConfiguracion()."');"; break;
                            case 'SedeRe':                  echo "Ext.getCmp('sedeRe')                .setValue('".$configuracion->getValorConfiguracion()."');"; break;
                            case 'SedeCa':                  echo "Ext.getCmp('sedeCa')                .setValue('".$configuracion->getValorConfiguracion()."');"; break;
                        }
                    }

                endif; ?>
            }
            catch(e){
                X.msg.FailureJs(e.message);
            }
        });
    </script>
</html>